  <form nz-form #f="ngForm" se-container="1">
    <se required  label="菜单类型">
      <app-radio [(ngModel)]="i.menuType" name="menuType" dictCode="menu_type"></app-radio>
    </se>
    <ng-container *ngIf="i.menuType===0">
      <se required  label="菜单名称">
        <input nz-input [(ngModel)]="i.name"   name="name" required>
      </se>
      <se required  label="菜单路径">
        <input nz-input [(ngModel)]="i.url" type="url" name="url" required>
      </se>
      <se required  label="前端组件">
        <input nz-input [(ngModel)]="i.component" name="component" required>
      </se>
      <se required  label="默认跳转地址">
        <input nz-input [(ngModel)]="i.redirect" name="redirect" required>
      </se>
      <se required  label="菜单图标">
        <input nz-input [(ngModel)]="i.icon" name="icon" required>
      </se>
      <se required  label="排序">
        <input nz-input [(ngModel)]="i.sortNo" name="sortNo" required>
      </se>
      <se required  label="是否菜单路由">
        <nz-switch [(ngModel)]="i.route" name="route" nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </se>
      <se required  label="是否隐藏路由">
        <nz-switch [(ngModel)]="i.hidden" name="hidden" nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </se>
      <se required  label="聚合路由">
        <nz-switch [(ngModel)]="i.alwaysShow" name="alwaysShow"  nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </se>
    </ng-container>

    <ng-container *ngIf="i.menuType===1">
      <se required  label="菜单名称">
        <input nz-input [(ngModel)]="i.name"   name="name" required>
      </se>
      <se required  label="菜单路径">
        <input nz-input [(ngModel)]="i.url" type="url" name="url" required>
      </se>
      <se required  label="前端组件">
        <input nz-input [(ngModel)]="i.component" name="component" required>
      </se>
      <se required  label="上级菜单">
        <app-tree-select [url]="'sys/permission/queryTreeList'" [(ngModel)]="i.parentId" name="parentId" required></app-tree-select>
      </se>
      <se required  label="菜单图标">
        <input nz-input [(ngModel)]="i.icon" name="icon" required>
      </se>
      <se required  label="排序">
        <input nz-input [(ngModel)]="i.sortNo" name="sortNo" required>
      </se>
      <se required  label="是否菜单路由">
        <nz-switch [(ngModel)]="i.route" name="route" nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </se>
      <se required  label="是否隐藏路由">
        <nz-switch [(ngModel)]="i.hidden" name="hidden" nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </se>
      <se required  label="聚合路由">
        <nz-switch [(ngModel)]="i.alwaysShow" name="alwaysShow"  nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </se>
    </ng-container>
    <ng-container *ngIf="i.menuType===2">
      <se required  label="按钮/权限">
        <input nz-input [(ngModel)]="i.name"   name="name" required>
      </se>
      <se required  label="上级菜单">
        <app-tree-select [url]="'sys/permission/queryTreeList'" [(ngModel)]="i.parentId" name="parentId" required></app-tree-select>
      </se>
      <se required  label="菜单路径">
        <input nz-input [(ngModel)]="i.url" type="url" name="url" required>
      </se>
      <se required  label="授权标识">
        <input nz-input [(ngModel)]="i.perms" name="perms" required>
      </se>
      <se required  label="授权策略">
        <app-radio [(ngModel)]="i.permsType" name="permsType" dictCode="perms_type"></app-radio>
      </se>
      <se required  label="状态">
        <app-radio [(ngModel)]="i.status" name="status" dictCode="p_status"></app-radio>
      </se>

    </ng-container>
  </form>

  <div class="drawer-footer">
    <button nz-button [nzType]="'default'" (click)="cancel()">
      取消
    </button>
    <button nz-button [nzType]="'primary'" (click)="save()">
      提交
    </button>
  </div>
